package foundation.FJ_string;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * FJ在沙盘上写了这样一些字符串：
 * 　　A1 = “A”
 * 　　A2 = “ABA”
 * 　　A3 = “ABACABA”
 * 　　A4 = “ABACABADABACABA”
 * 　　… …
 * 　　你能找出其中的规律并写所有的数列AN吗？
 */
public class Main {
    static Map<Integer, String> map = new HashMap<Integer, String>() {{
        put(1, "A");
        put(2, "B");
        put(3, "C");
        put(4, "D");
        put(5, "E");
        put(6, "F");
        put(7, "G");
        put(8, "H");
        put(9, "I");
        put(10, "J");
        put(11, "K");
        put(12, "L");
        put(13, "M");
        put(14, "N");
        put(15, "O");
        put(16, "P");
        put(17, "Q");
        put(18, "R");
        put(19, "S");
        put(20, "T");
        put(21, "U");
        put(22, "V");
        put(23, "W");
        put(24, "X");
        put(25, "Y");
        put(26, "Z");
    }};

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(getString(n).toString());
    }

    public static StringBuilder getString(int n) {
        StringBuilder str = new StringBuilder();
        if (n == 1) {
            str.append("A");
        } else {
            String s = map.get(n);
            StringBuilder tmp = getString(n - 1);
            str.append(tmp);
            str.append(s);
            str.append(tmp);
        }
        return str;
    }
}
